//
//  RankDetailCell.m
//  Coco_Music
//
//  Created by dlios on 15-6-20.
//  Copyright (c) 2015年 寇广超. All rights reserved.
//

#import "RankDetailCell.h"

@implementation RankDetailCell
-(void)dealloc
{
    [_NameLabel release];
    [_singerArray release];
    [_SingerLabel release];
    [_collectLabel release];
    [_numberLabel release];
    [_rank release];
    [_songArray release];
    [_singerArray release];
    [super dealloc];
}
-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self =[super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self createSubViews];
    }
    return self;
    
}
-(void)createSubViews
{
    
    UIImageView *image =[[UIImageView alloc]initWithImage:[UIImage imageNamed:@"dts_accessory_over_ear_chosen"]];
    image.frame = CGRectMake(20, self.frame.size.height/2, [UIScreen mainScreen].bounds.size.width/10, [UIScreen mainScreen].bounds.size.width/10);
    [self addSubview:image];
    
    
    self.numberLabel =[[UILabel alloc]initWithFrame:CGRectMake(image.frame.origin.x+image.frame.size.width+40, 10, 20, 40)];
    [self addSubview:self.numberLabel];
    self.numberLabel.shadowColor = [UIColor colorWithRed:244.0f/255.0f green:147.0f/255.0f blue:23.0f/255.0f alpha:1.0f];
    [_numberLabel release];
    
    
    self.NameLabel =[[UILabel alloc]initWithFrame:CGRectMake(self.numberLabel.frame.origin.x+self.numberLabel.frame.size.width+5, self.numberLabel.frame.origin.y,[UIScreen mainScreen].bounds.size.width/2, 40)];
    self.NameLabel.numberOfLines = 0;
    self.NameLabel.shadowColor = [UIColor colorWithRed:244.0f/255.0f green:147.0f/255.0f blue:23.0f/255.0f alpha:1.0f];
    [self addSubview:self.NameLabel];
    [_NameLabel release];
    

    self.SingerLabel =[[UILabel alloc]initWithFrame:CGRectMake(self.numberLabel.frame.origin.x+10, self.numberLabel.frame.origin.y+self.numberLabel.frame.size.height, [UIScreen mainScreen].bounds.size.width/2, 40)];
    self.SingerLabel.numberOfLines = 0;
    self.SingerLabel.shadowColor =[UIColor colorWithRed:244.0f/255.0f green:147.0f/255.0f blue:23.0f/255.0f alpha:1.0f];
    [self addSubview:self.SingerLabel];
    [_SingerLabel release];

    self.ImageLine = [[UIImageView alloc]initWithFrame:CGRectMake(image.frame.size.width+20+5 ,84,[UIScreen mainScreen].bounds.size.width-image.frame.size.width, 1)];

    [self.contentView addSubview:_ImageLine];
    [self.ImageLine release];
}
-(void)setRank:(RankDetail *)rank
{
    if (_rank !=rank) {
        [_rank release];
        _rank = [rank retain];
    }
    
    self.NameLabel.text = [NSString stringWithFormat:@"%@", rank.album_name];
    self.SingerLabel.text = [NSString stringWithFormat:@"%@", rank.singer_name];

   



}
- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
